using CommandLine;

namespace JamesFan.FetchAreaCodes.Cli;

internal class CliOptions {
    [Option('c', "console", HelpText = "在控制台输出")]
    public bool Console { get; set; }

    [Option('v', "version", HelpText = "显示版本")]
    public bool ShowVersion { get; set; }

    [Option('l', "level", HelpText = "需要获取的最大层级，默认为 3")]
    public ushort MaxLevel { get; set; } = 3;

    [Option('t', "timeout", HelpText = "等待抓取网页内容的最长时间，以秒为单位，默认 30 秒")]
    public ushort Timeout { get; set; } = 30;

    [Option('r', "retry", HelpText = "抓取网页失败时重试次数，默认 1 次")]
    public ushort Retry { get; set; } = 1;

    public virtual void Validate() { }
}
